/**
 * Created by brantyan on 14-1-16.
 */
//Template2
angular.module('pony',['ngResource'])
    .factory('ponyService',function($resource){
        return {
            get:$resource('/rest/pony/best')
        }
    })
    .controller('PonyCtrl',function($scope,ponyService){

        $scope.isRevealed=true;
        $scope.onClick =function(){
            ponyService.get.get(function(pony){
                $scope.isRevealed = true;
                $scope.pony = pony;

            });
        };
    });